Do a complete overhaul of the babl API.
authorMartin Nordholts <martinn@src.gnome.org>
Sat, 24 Jan 2009 08:52:04 +0000 (08:52 +0000)
committerMartin Nordholts <martinn@src.gnome.org>
Sat, 24 Jan 2009 08:52:04 +0000 (08:52 +0000)
commita37c35450bbb8bb1901e617ae90192b666bfa36a
tree40be19b9663ba1af6e1a19e02b6e5301e0ff313e
parente74ab814d7ca971ce6842effd38dc805de96b6a9
Do a complete overhaul of the babl API.

* babl/babl.h: Instead of including subsystem headers, declare the
functions part of the API directly in the header. The public
types, macros and the version header is still pulled in as
includes but with inclusion guards that prevent them from being
included separately by clients. Notable things removed from the
API is internal class functions and the class instance structs.

(babl_format_has_alpha)
(babl_format_get_bytes_per_pixel)
(babl_format_get_num_of_components)
(babl_format_get_type): New getters to allow the Babl union to
become opaque for clients.

* babl/babl-types.h: New file with public types. Currently only
the opaque Babl union and the linear and planar conversion
function prototypes (which are not used in the API due to the use
of varags but still part of the API for reference) are there. Make
sure it's only included indirectly through babl.h.

* babl/babl-macros.h
* babl/babl-version.h.in: Make sure these are not included
directly, only indirectly through babl.h.

* babl/babl-main.h: Removed, function declarations are in babl.h
now.

* babl/babl-internal.h: Include the headers we now consider
internal, mostly the different class headers.

* babl/babl-class.h: The "named class" function declarations are
now in the public header so move them away from this internal
header.

* babl/babl-image.h
* babl/babl-format.h
* babl/babl-fish.h
* babl/babl-extension.h
* babl/babl-conversion.h
* babl/babl-component.h
* babl/babl-classes.h
* babl/babl-introspect.h
* babl/babl-sampling.h
* babl/babl-model.h
* babl/babl-type.h: Adapt to above changes, move relevant things to babl.h

* babl/base/formats.c
* babl/base/model-gray.c
* babl/base/model-rgb.c
* babl/base/model-ycbcr.c
* babl/base/type-float.c: Explicitly #include "babl-classes.h".

* babl/babl-internal.c: s/babl_name/babl_get_name/

* babl/babl-format.c
(babl_format_has_alpha)
(babl_format_get_bytes_per_pixel)
(babl_format_get_num_of_components)
(babl_format_get_type): Implement these.

* babl/Makefile.am: Don't install the now internal headers and
add, remove and install the other headers according to above
changes.

svn path=/trunk/; revision=390
27 files changed:
ChangeLog
babl/Makefile.am
babl/babl-class.h
babl/babl-classes.h
babl/babl-component.h
babl/babl-conversion.h
babl/babl-extension.h
babl/babl-fish.h
babl/babl-format.c
babl/babl-format.h
babl/babl-image.h
babl/babl-internal.c
babl/babl-internal.h
babl/babl-introspect.h
babl/babl-macros.h
babl/babl-main.h
babl/babl-model.h
babl/babl-sampling.h
babl/babl-type.h
babl/babl-types.h [new file with mode: 0644]
babl/babl-version.h.in
babl/babl.h
babl/base/formats.c
babl/base/model-gray.c
babl/base/model-rgb.c
babl/base/model-ycbcr.c
babl/base/type-float.c